package caidan;

import java.awt.Color;
import java.awt.Window;

import caidan.data.MaterialPane;
import caidan.data.SearchPane;
import caidan.res.Resource;
import jinyilw.swing.visuals.Rcomp.RDialog;

public class SearchDialog extends RDialog
{
	private static final long serialVersionUID = 942876585735670810L;
	private SearchPane searchPane;

	public SearchDialog(Window window)
	{
		super(window);
		setTitle("食材搜索");
		setWindowSymbol(Resource.searchIcon);
		setOptionStyle(150, 0.97f);
		setSection(12);
		setTitleHeight(28);
		setTitleColor(Color.green);
		searchPane = new SearchPane(this);
		setContentPane(searchPane);
		setSize(500, 370);
		setLocationRelativeTo(window);
	}

	public void setMaterialPane(MaterialPane materialPane)
	{
		searchPane.setMaterialPane(materialPane);
	}

	public void resetContent()
	{
		searchPane.resetContent();
	}
}
